﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using YoUI.Core;

[AddComponentMenu("YoUI/Audio/YoButtonAudio")]
[RequireComponent(typeof(Button))]
public class YoButtonAudio : MonoBehaviour {

    public AudioClip clip;
    private void Awake()
    {
        GetComponent<Button>().onClick.AddListener(() =>
        {
            YoAudioMgr._.Play(clip);
        });        
    }
}
